package com.dotflat.cc.controller;

import com.matt.foundation.dto.teach.ChildDTO;
import com.matt.foundation.model.StatusResponse;
import com.matt.foundation.vo.ClienteleNameVo;
import com.matt.service.TeachCallService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.stream.Collectors;


/**
 * @author ：Ron
 * @date ：Created in 11/6/2020 5:07 PM
 */
@RestController
@RequestMapping("/v2/cc/")
@Slf4j
@Api(tags = "其他系统 - 班级和宝宝")
public class ClassNChildController {

    @Autowired
    private TeachCallService teachCallService;

    @RequestMapping(value = "/classes")
    @ApiOperation(value = "获取CRM可用的班级列表", httpMethod = "GET")
    public StatusResponse classes(@RequestHeader String ticket) {
        return StatusResponse.success(teachCallService.getClassList(ticket, 1));
    }
}
